#include <stdio.h>
#include <signal.h>
#include <unistd.h>

void FunSignalHandler( int iSignalNo )
{
    printf( "Singal# %d Received\n", iSignalNo );
}

int main(int argc, char const *argv[])
{
    signal( SIGINT, FunSignalHandler );

    int iCnt = 1;
    while ( 1 )
    {
        if ( ( iCnt % 5 ) == 0 )
        {
            raise( SIGINT );
        }
        printf( "Running %3d\n", iCnt );
        sleep( 1 );
        iCnt++ ;
    }
    
    return 0;
}
